package com.goldsprite.gameframeworks.assets;

public enum GameRes {
	//主相机视图
	MainCameraView(),
	//UI
	Boss_Sample("sprites/blocks/boss_sample.png"),

	//GameUI_Skin

	//背景

	//实体

	//方块
	SpawnPoint("sprites/blocks/icon_location.png"),
	Grass0("sprites/blocks/grass0.png"),
	Grass("sprites/blocks/grass.png"),

	//九宫格
	NinePatch_Grass("sprites/grass.png", new float[]{16, 16, 32, 16}),

	//物品

	//音频
	BGM_Thema("audios/bgm/thema.m4a", GameResType.Music),

	//颜色
	Black(GameResType.Color),
	White(GameResType.Color),
	Blue(GameResType.Color),
	Gray(GameResType.Color);

	private String path = "";
	private GameResType type = GameResType.Texture;
	private float[] ninePatchEdge = null;//左右上下

	GameRes() {
	}

	GameRes(String path) {
		this.path = path;
	}
	GameRes(GameResType type){
		this.type = type;
	}
	GameRes(String path, GameResType type){
		this.path = path;
		this.type = type;
	}
	GameRes(String path, float[] ninePatchEdge){
		this.path = path;
		this.ninePatchEdge = ninePatchEdge;
	}

	public String getPath() {
		return path;
	}

	public GameResType getType() {
		return type;
	}
	public void setType(GameResType type) {
		this.type = type;
	}

	public <T> T getResource() {
		return GameAssetManager.getInstance().getResource(this);
	}

	public float[] getNinePatchEdge() {
		return ninePatchEdge;
	}

	public enum GameResType {
		Color, Texture, Music, NinePatch
	}
}
